<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
<div class="tt">检测条件</div>
<form method="post" action="?">
    <input type="hidden" name="file" value="<?php echo $file;?>"/>
	<input type="hidden" name="file" value="<?php echo $file;?>"/>
	<input type="hidden" name="action" value="<?php echo $action;?>"/>
	<input type="hidden" name="moduleid" value="<?php if (isset($moduleid)) echo $moduleid; ?>" />
	<input type="hidden" name="typename" value="<?php if (isset($typename)) echo $typename; ?>" />
    <table cellpadding="2" cellspacing="1" class="tb">
        <tr>
            <td class="tl"><span class="f_red">*</span> 字段</td>
            <td><input type="text" size="10" name="key" value="<?php if (isset($key)) echo $key; ?>"/></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_red">*</span> 数量</td>
            <td><input type="text" size="10" name="num" value="<?php if (isset($num)) echo $num; ?>"/></td>
        </tr>
        <tr>
            <td class="tl"></td>
            <td height="30">&nbsp;<input type="submit" name="submit" value="开始检测" class="btn" onclick="this.value='检测中..';this.blur();this.className='btn f_gray';"/>&nbsp;
                <input type="button" value="重新检测" class="btn" onclick="window.location='?file=<?php echo $file;?>';"/>
            </td>
        </tr>
    </table>
</form>
<?php if ($submit) { ?>
<div class="tt">检测结果</div>
<table cellpadding="2" cellspacing="1" class="tb">
	<?php if ($lists) { ?>
    <tr>
        <th>名称</th>
        <th>重复次数</th>
        <th width="60">查看</th>
    </tr>
	<?php foreach ($lists as $k => $v) { ?>
        <tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center">
            <td align="left">&nbsp;&nbsp;<img src="admin/image/htm.gif" align="absmiddle"/> <a href="?moduleid=<?php echo $moduleid;?>&field=<?php echo $key;?>&kw=<?php echo $v[$key];?>" target="_blank"><?php echo $v[$key];?></a></td>
            <td><?php echo $v['num'];?></td>
            <td><a href="?moduleid=<?php echo $moduleid;?>&field=<?php echo $key;?>&kw=<?php echo $v[$key];?>" target="_blank"><img src="admin/image/view.png" width="16" height="16"/></a></td>
        </tr>
		<?php } ?>
	<?php } else { ?>
    <tr>
        <td class="f_blue" height="40">&nbsp;- 指定范围没有检测到重复信息&nbsp;&nbsp;&nbsp;&nbsp;<a href="?file=<?php echo $file;?>" class="t">[重新检测]</a></td>
    </tr>
	<?php } ?>
</table>
<?php } ?>
<script type="text/javascript">Menuon(6);</script>
<?php include tpl('footer'); ?>